-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix xcode-10.2 issues #891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea getting rid of the #function.
However I would suggest avoiding using multiple duplicated string literals all over the place (as they are harder to refactor and error prone). A form of mapping might be helpful here: e.g.
enum Function: String {
case count
case greaterThan = ">"
...
}
Strings to enum constants
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this, looks great! I have a couple of small suggestions.
@@ -24,6 +24,40 @@ | |||
|
|||
import Foundation | |||
|
|||
private enum Functions: String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enum
name should be singular e.g. Function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
case trim | ||
case replace | ||
case substr | ||
case LIKE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as a convention case
name should be lower case - I'd personally change those (e.g. case like = "LIKE"
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. I think the common naming style is better. Updated.
Sources/SQLite/Typed/Operators.swift
Outdated
@@ -24,266 +24,297 @@ | |||
|
|||
// TODO: use `@warn_unused_result` by the time operator functions support it | |||
|
|||
private enum Operators: String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto, better singular Operator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
Fixed enums naming
This look good - could you kindly have a look at the failing CI checks? |
Travis bug. Couldn't start watch simulator
…On Thu, 28 Mar 2019, 10:10 Antonio Tanzola, ***@***.***> wrote:
This look good - could you kindly have a look at the failing CI checks?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#891 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABFMkUQ4gF_BeSbOT6QZ4XM0BCCRHFzKks5vbHkDgaJpZM4cLQ94>
.
|
@stephencelis What do you think? Can you merge it? The library doesn't work in Xcode 10.2 at all :( |
Just wanted to thank you @ypopovych for this work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Sorry for the delay. I'll also added you as a contributor if you'd like to help continue unblock these kinds of things in the future.
@here: After updated codes to latest, I still get unrecognized token: ":" error when count table. Is it really solved? Thanks! |
@eschao The version in the podspec has not gotten bumped so your CocoaPods is probably caching the pod. You could clear your CocoaPods cache, you could point directly to this git repo, or you could wait until they bump the version. 😄 I had pointed to ottosuess's git repo and all the errors had gone away. |
@stephencelis could you please make a release for this PR ? |
@nickgzzjr No cocoapods, I use carthage, I deleted all including carthage checkout, carthage build and cache, and then updated again. but the problem is still existing. Any step I missed or made wrong? |
Please update ASAP if the issue is fixed. |
@stephencelis Did this update got released in a new version of the pod?? I just updated mine to |
I pointed to ottosuess's git repo, but I still get the error:
use
|
It should work from CocoaPods. 0.12.0 |
resolves #888
I replaced all the
#function
magic by static strings.